package com.xr.core.system.entity.dictionaryModule;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.xr.core.system.common.base.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 字典表 (Dictionary)表实体类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class Dictionary extends BaseEntity {

    /**
     * 父id
     */
    @JsonProperty("pId")
    private Long parentId;

    /**
     * 字典码
     */
    @JsonProperty("pCode")
    private String code;

    /**
     * 字典名称
     */
    @JsonProperty("pName")
    private String name;

    /**
     * 附加字段1
     */
    @JsonProperty("other1")
    private String attach1;

    /**
     * 附加字段2
     */
    @JsonProperty("other2")
    private String attach2;

    /**
     * 备注
     */
    @JsonProperty("explanation")
    private String remark;

    /**
     * 子级
     */
    @TableField(exist = false)
    private List<Dictionary> children;

}

